package top.lv666.graduation_design_serve.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.lv666.graduation_design_serve.pojo.Message;
import top.lv666.graduation_design_serve.pojo.ReplyMessage;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface MessageMapper {
    void CreateBlogMessage(Map<String, Object> map);

    List<Message> QueryBlogMessage(Map<String, Object> map);

    int getBlogMessageCount(String blogId);

    void setSecondaryMessage(Map<String, Object> map);

    // 给一个评论ID获取详细信息
    Message queryBlogMessageById(int messageId);

    // 修改一次留言属性
    void modifyBlogMessage(Map<String, Object> map);

    // 分页查询二级评论
    List<ReplyMessage> queryReplyMessage(Map<String, Object> map);

    //查询当前评论下有多少回复
    int queryReplyMessageCount(int messageId);
}
